<%@ Page Language="c#" Inherits="PHSRAG.Insight21.FormsManagement.FormEditor" CodeFile="FormEditor.aspx.cs" %>

<%@ Register TagPrefix="cc1" Namespace="PHSRAG.Insight21.InsightWebControls" Assembly="PHSRAG.Insight21.InsightWebControls" %>
<%@ Register TagPrefix="cc2" Namespace="PHSRAG.WebControls" Assembly="PHSRAG.WebControls" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>FormEditor</title>
    <link href="../Insight21.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" language="javascript">
		function RestrictItemSelection(rowCurrentlySelected)
		{
			var selectedItemTracker = document.getElementById('selectedItemTracker');
			var rowPreviouslySelected = selectedItemTracker.value;
			if (rowPreviouslySelected != '' && rowPreviouslySelected != rowCurrentlySelected)
			{
				var versionPreviouslyActive = document.getElementById(rowPreviouslySelected);
				versionPreviouslyActive.setAttribute('checked', false); // uncheck the previously selected radio
			}
			selectedItemTracker.value = rowCurrentlySelected; //save the current radio in the hidden field
		}
		
		function adjustDivs()
		{
			var updateProgressControls = ['<%=upPrgDependency.ClientID%>', '<%=upPrgDocuments.ClientID%>', '<%=upPrgScripts.ClientID%>'];
			for (var i=0; i<updateProgressControls.length; ++i)
			{
				var progressControl = document.getElementById(updateProgressControls[i]);
				if (progressControl != null)
				{
					progressControl.style.position='absolute'  ;
					progressControl.style.left = document.body.offsetWidth/2 + document.body.scrollLeft -60 ;
					progressControl.style.top = document.body.offsetHeight/2 + document.body.scrollTop -50;
				}
			}  
		}

		window.onload=adjustDivs;
		window.onresize=adjustDivs;
		window.onscroll=adjustDivs;
    </script>

</head>
<body>
    <form method="post" id="FormEditorForm" runat="server">
        <table class="Container" cellpadding="0">
            <tr>
                <td>
                    <table class="Header" width="100%">
                        <tr>
                            <td>
                                <cc1:Header ID="header" runat="server"></cc1:Header>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td>
                                <cc1:AdminSubNavigation ID="adminSubNavigation" runat="server" Visible="false"></cc1:AdminSubNavigation>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc1:AdminHumansSubNavigation ID="adminHumansSubNavigation" runat="server"></cc1:AdminHumansSubNavigation>
                                <cc1:CoISubNavigation ID="coiSubNavigation" runat="server"></cc1:CoISubNavigation>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                    <table class="Placebar" width="100%">
                        <tr align="left">
                            <td>
                                <cc2:BreadCrumb ID="breadCrumb" runat="server"></cc2:BreadCrumb>
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td>
                                <cc2:Annunciator ID="annunciator" runat="server"></cc2:Annunciator>
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td>
                                <cc2:PostbackGuard ID="postbackGuard" runat="server"></cc2:PostbackGuard>
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td>
                                <input id="selectedItemTracker" type="hidden" name="selectedItemTracker" runat="server" /><input
                                    id="deleteConfirmation" type="hidden" runat="server" /><asp:ScriptManager ID="scriptManager"
                                        runat="server">
                                    </asp:ScriptManager>
                            </td>
                        </tr>
                    </table>
                    <table width="100%">
                        <tbody>
                            <tr>
                                <td>
                                    <cc2:ExpandingPanel ID="helpContainer" runat="server" ExpansionToggler="expansionToggler">
                                        <StaticTemplate>
                                            <table class="Search">
                                                <tr>
                                                    <td>
                                                        <table id="expandedHelp" runat="server">
                                                            <tr>
                                                                <td>
                                                                    <cc2:ExpansionToggler ID="expansionToggler" runat="Server" CollapsedLinkCaption="Show Instructions"
                                                                        ExpandedLinkCaption="Hide Instructions" CollapsedImage="~/Images/Arrow_RT.gif"
                                                                        ExpandedImage="~/Images/Arrow_DN.gif"></cc2:ExpansionToggler>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </StaticTemplate>
                                        <DynamicTemplate>
                                            <table class="SearchDynamic">
                                                <tr>
                                                    <td>
                                                        &nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <ul>
                                                            <li>To add a question, click the 'Add Question' button</li>
                                                            <li>To modify a question, click on the question name</li>
                                                            <li>To change the order in which questions are displayed, select the question to be
                                                                reordered, use the up or down arrow images to either increase or decrease the display
                                                                order of the question</li>
                                                        </ul>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        &nbsp;</td>
                                                </tr>
                                            </table>
                                        </DynamicTemplate>
                                    </cc2:ExpandingPanel>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table width="100%">
                        <tr>
                            <td style="white-space: nowrap">
                                Questionnaire Name:</td>
                            <td style="white-space: nowrap">
                                <strong>
                                    <asp:Label ID="questionnaireName" runat="server"></asp:Label></strong></td>
                            <td style="width:100%">
                            </td>
                            <td>
                                Version:</td>
                            <td>
                                <strong>
                                    <asp:Label ID="questionnaireVersion" runat="server"></asp:Label></strong></td>
                        </tr>
                        <tr>
                            <td colspan="5">
                                &nbsp;</td>
                        </tr>
                    </table>
                    <!-- Questionnaire Items DataGrid-->
                    <table width="100%">
                        <tr>
                            <td colspan="2">
                                <table>
                                    <tr>
                                        <td align="left">
                                            <asp:Button ID="addQuestionnaireItem" runat="server" Visible="True" Text="Add Question"
                                                CssClass="Button" CommandName="AddQuestionnaireItem" Width="140px" OnClick="OnAddQuestionnaireItemClick">
                                            </asp:Button></td>
                                        <td style="width:100%">
                                        </td>
                                        <td align="right">
                                            <asp:Button ID="previewQuestionnaire" runat="server" Visible="True" Text="Preview Questionnaire"
                                                CssClass="FixedWidthButton" CommandName="PreviewQuestionnaire" Width="140px"
                                                OnClick="OnPreviewQuestionnaireClick"></asp:Button></td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            &nbsp;</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc2:Pager ID="topPager" runat="server"></cc2:Pager>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:100%">
                                <asp:DataGrid ID="versionItems" runat="server" CssClass="DataGrid" Width="100%" AutoGenerateColumns="False"
                                    AllowPaging="True" AllowCustomPaging="True">
                                    <FooterStyle CssClass="DataGridHeader"></FooterStyle>
                                    <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                                    <ItemStyle CssClass="DataGridItem"></ItemStyle>
                                    <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                    <Columns>
                                        <asp:TemplateColumn Visible="False" HeaderText="ID">
                                            <ItemTemplate>
                                                <asp:Label ID="questionnaireItemID" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.ID")%>'>
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:ButtonColumn DataTextField="Name" HeaderText="Name" CommandName="ItemEditor.aspx">
                                            <ItemStyle Width="15%"></ItemStyle>
                                        </asp:ButtonColumn>
                                        <asp:BoundColumn DataField="Text" HeaderText="Text"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Type" HeaderText="Type">
                                            <ItemStyle Width="15%"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:TemplateColumn HeaderText="Select">
                                            <ItemStyle HorizontalAlign="Center" Width="4%"></ItemStyle>
                                            <ItemTemplate>
                                                <asp:RadioButton ID="selectItem" runat="server"></asp:RadioButton>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                    </Columns>
                                    <PagerStyle Visible="False"></PagerStyle>
                                </asp:DataGrid></td>
                            <td valign="top">
                                <table>
                                    <tr>
                                        <td>
                                            <asp:ImageButton ID="moveItemUp" runat="server" ImageUrl="../Images/up.gif"></asp:ImageButton></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:ImageButton ID="moveItemDown" runat="server" ImageUrl="../Images/down.gif"></asp:ImageButton></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc2:Pager ID="bottomPager" runat="server"></cc2:Pager>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Button ID="deleteItem" runat="server" Text="Delete" CssClass="FixedWidthButton"
                                    CommandName="Delete" OnClick="OnDeleteItemClick"></asp:Button></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                    <table width="100%">
                        <tr>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <hr />
                                <!-- Dependency Panel -->
                                <asp:Panel ID="dependencyPane" runat="server">
                                    <asp:UpdatePanel ID="upDependency" runat="server">
                                        <ContentTemplate>
                                            <table>
                                                <tr>
                                                    <td colspan="2">
                                                        <strong>Dependencies</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <img alt="" height="3" src="../../Images/Clear.gif"></td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <asp:DataGrid ID="dependencyItems" runat="server" CssClass="DataGrid" AutoGenerateColumns="False">
                                                            <FooterStyle CssClass="DataGridHeader"></FooterStyle>
                                                            <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                                                            <ItemStyle CssClass="DataGridItem"></ItemStyle>
                                                            <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                                            <Columns>
                                                                <asp:TemplateColumn HeaderText="SNo" Visible="False">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="dependencySNo" runat="server" CssClass="DataInput" Text='<%#DataBinder.Eval(Container, "DataItem.SNo") %>'>
                                                                        </asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="ID" Visible="False">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="dependencyId" runat="server" CssClass="DataInput" Text='<%#DataBinder.Eval(Container, "DataItem.ID") %>'>
                                                                        </asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Parent Question">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="dependencyParentQuestion" CssClass="FlatDropDown" runat="server"
                                                                            AutoPostBack="True" OnSelectedIndexChanged="OnDependencyParentChanged" DataValueField="Value"
                                                                            DataTextField="Text" DataSource='<%#ParentItemsForDependancy%>'>
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Value">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="dependencyParentValue" CssClass="FlatDropDown" runat="server">
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Child Question">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="dependencyChildQuestion" CssClass="FlatDropDown" runat="server"
                                                                            DataTextField="Text" DataValueField="Value" DataSource='<%#ChildItemsForDependancy%>'>
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Indent Child Question" ItemStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:CheckBox ID="indentChild" runat="server"></asp:CheckBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Mark for Deletion" ItemStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:CheckBox ID="selectDependency" runat="server"></asp:CheckBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                            </Columns>
                                                        </asp:DataGrid></td>
                                                </tr>
                                                <tr>
                                                    <td align="left">
                                                        <asp:Button ID="addDependency" CommandName="DependencyAdd" runat="server" CssClass="FixedWidthButton"
                                                            Text="Add" OnClick="OnAddDependancy"></asp:Button></td>
                                                    <td align="right">
                                                        <asp:Button ID="deleteDependency" CommandName="DependencyDelete" runat="server" CssClass="FixedWidthButton"
                                                            Text="Delete" OnClick="OnDeleteDependancy"></asp:Button></td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                    <asp:UpdateProgress ID="upPrgDependency" runat="server" AssociatedUpdatePanelID="upDependency"
                                        DisplayAfter="100">
                                        <ProgressTemplate>
                                            <table id="updateProgressTable" cellpadding="0" cellspacing="0" style="border: 1px solid #000000;"
                                                width="120">
                                                <tr>
                                                    <td align="center" style="background-color:#6699ff">
                                                        <span style="font-weight:bold;color:#ffffff">Please wait...</span></td>
                                                </tr>
                                                <tr>
                                                    <td align="center" style="background-color:#ffffff">
                                                        <table id="table2" border="0" cellpadding="3" cellspacing="4">
                                                            <tr>
                                                                <td>
                                                                    <img alt="" src="../Images/ActivityIndicator.gif" /></td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <hr />
                                <!--Document-->
                                <asp:Panel ID="documentPane" runat="server">
                                    <asp:UpdatePanel ID="upDocuments" runat="server">
                                        <ContentTemplate>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <strong>Documents</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <img alt="" height="3" src="../Images/Clear.gif"></td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <asp:DataGrid ID="documentItems" runat="server" CssClass="DataGrid" AutoGenerateColumns="False">
                                                            <FooterStyle CssClass="DataGridHeader"></FooterStyle>
                                                            <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                                                            <ItemStyle CssClass="DataGridItem"></ItemStyle>
                                                            <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                                            <Columns>
                                                                <asp:TemplateColumn HeaderText="SNo" Visible="False">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="documentSNo" runat="server" CssClass="DataInput" Text='<%#DataBinder.Eval(Container, "DataItem.SNo") %>'>
                                                                        </asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:BoundColumn DataField="ID" Visible="False"></asp:BoundColumn>
                                                                <asp:TemplateColumn HeaderText="Question">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="documentQuestion" runat="server" CssClass="FlatDropDown" AutoPostBack="True"
                                                                            OnSelectedIndexChanged="OnDocumentQuestionChanged" DataTextField="Text" DataValueField="Value"
                                                                            DataSource='<%#ChildItemsForDependancy%>'>
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Value">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="documentValue" runat="server" CssClass="FlatDropDown">
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Document Type">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="documentType" runat="server" CssClass="FlatDropDown" DataTextField="Meaning"
                                                                            DataValueField="Code" DataSource='<%#DocumentTypes%>'>
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Required" ItemStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:CheckBox ID="documentRequired" runat="server" Text=""></asp:CheckBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Validation Message">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="documentValidationMessage" CssClass="FlatTextBox" runat="server"
                                                                            Columns="50" Rows="3" TextMode="MultiLine"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Mark for Deletion" ItemStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:CheckBox ID="selectDocument" runat="server"></asp:CheckBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                            </Columns>
                                                        </asp:DataGrid></td>
                                                </tr>
                                                <tr>
                                                    <td align="left">
                                                        <asp:Button ID="addDocument" CommandName="DocumentAdd" runat="server" CssClass="FixedWidthButton"
                                                            Text="Add" OnClick="OnAddDocument"></asp:Button></td>
                                                    <td align="right">
                                                        <asp:Button ID="deleteDocument" CommandName="DocumentDelete" runat="server" CssClass="FixedWidthButton"
                                                            Text="Delete" OnClick="OnDeleteDocument"></asp:Button></td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                    <asp:UpdateProgress ID="upPrgDocuments" runat="server" AssociatedUpdatePanelID="upDocuments"
                                        DisplayAfter="100">
                                        <ProgressTemplate>
                                            <table id="updateProgressTable" cellpadding="0" cellspacing="0" style="border: 1px solid #000000;"
                                                width="120">
                                                <tr>
                                                    <td align="center" style="background-color:#6699ff">
                                                        <span style="font-weight:bold;color:#ffffff">Please wait...</span></td>
                                                </tr>
                                                <tr>
                                                    <td align="center" style="background-color:#ffffff">
                                                        <table id="table2" border="0" cellpadding="3" cellspacing="4">
                                                            <tr>
                                                                <td>
                                                                    <img alt="" src="../Images/ActivityIndicator.gif" /></td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <hr />
                                <!-- Scripts -->
                                <asp:Panel ID="scriptPane" runat="server">
                                    <asp:UpdatePanel ID="upScripts" runat="server">
                                        <ContentTemplate>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <strong>Scripts</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <img alt="" height="3" src="../Images/Clear.gif"></td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <asp:DataGrid ID="scriptItems" runat="server" CssClass="DataGrid" AutoGenerateColumns="False">
                                                            <FooterStyle CssClass="DataGridHeader"></FooterStyle>
                                                            <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                                                            <ItemStyle CssClass="DataGridItem"></ItemStyle>
                                                            <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                                            <Columns>
                                                                <asp:TemplateColumn HeaderText="SNo" Visible="False">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="scriptSNo" runat="server" CssClass="DataInput" Text='<%#DataBinder.Eval(Container, "DataItem.SNo") %>'>
                                                                        </asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="ID" Visible="False">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="scriptID" runat="server" CssClass="DataInput" Text='<%#DataBinder.Eval(Container, "DataItem.ID") %>'>
                                                                        </asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Script Type">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="scriptType" runat="server" CssClass="FlatDropDown">
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Script">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="scriptText" runat="server" CssClass="FlatTextBox" Columns="150"
                                                                            Rows="10" TextMode="MultiLine"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn HeaderText="Mark for Deletion" ItemStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:CheckBox ID="selectScript" runat="server"></asp:CheckBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                            </Columns>
                                                        </asp:DataGrid></td>
                                                </tr>
                                                <tr>
                                                    <td align="left">
                                                        <asp:Button ID="addScript" CommandName="ScriptAdd" runat="server" CssClass="FixedWidthButton"
                                                            Text="Add" OnClick="OnAddScript"></asp:Button></td>
                                                    <td align="right">
                                                        <asp:Button ID="deleteScript" CommandName="ScriptDelete" runat="server" CssClass="FixedWidthButton"
                                                            Text="Delete" OnClick="OnDeleteScript"></asp:Button></td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                    <asp:UpdateProgress ID="upPrgScripts" runat="server" AssociatedUpdatePanelID="upScripts"
                                        DisplayAfter="100">
                                        <ProgressTemplate>
                                            <table id="updateProgressTable" cellpadding="0" cellspacing="0" style="border: 1px solid #000000;"
                                                width="120">
                                                <tr>
                                                    <td align="center" style="background-color:#6699ff">
                                                        <span style="font-weight:bold;color:#ffffff">Please wait...</span></td>
                                                </tr>
                                                <tr>
                                                    <td align="center" style="background-color:#ffffff">
                                                        <table id="table2" border="0" cellpadding="3" cellspacing="4">
                                                            <tr>
                                                                <td>
                                                                    <img alt="" src="../Images/ActivityIndicator.gif" /></td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </asp:Panel>
                                <hr />
                            </td>
                        </tr>
                    </table>
                    <br />
                    <table width="100%">
                        <tr>
                            <td align="center">
                                <asp:Button ID="cancelChanges" runat="server" CommandName="Cancel" CssClass="FixedWidthButton"
                                    Text="Back" OnClick="OnCancelClick"></asp:Button></td>
                            <td align="center">
                                <asp:Button ID="saveChanges" runat="server" CommandName="Save" CssClass="FixedWidthButton"
                                    Text="Save" OnClick="OnSaveClick"></asp:Button></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
